<template>
	<view class="header">
		<search placeholder="请输入要查询的商品" @confirm="search"></search>
		<swiper indicator-dots indicator-color="white" indicator-active-color="green" autoplay circular duration="1000" interval="3000">
			<swiper-item v-for="item in list">
				<image :src="item" @tap="toDetail"></image>
			</swiper-item>
		</swiper>
		<view v-for="item in photoData">
			<photo :options="item"></photo>
		</view>
	</view>
</template>
 
<script>
    import photo from '@/components/hm-photo-card/index.vue'
	import search from '@/components/uni-search-bar/uni-search-bar.vue'
	export default {
		components: {
            photo, search
        },
		data() {
			return {
				list: [
					'../../static/images/1.jpg','../../static/images/2.jpg',
					'../../static/images/3.jpg','../../static/images/4.jpg',
					'../../static/images/5.jpg','../../static/images/6.jpg',
					'../../static/images/7.jpg'
				],
				photoData:[
					{
						title: '图片',
						titleImg: '/static/hm-photo-card/images/img_24027_0_0.png',
						titleUrl: '/pages/goods/goodList',
						img: {
							src: '/static/images/1.jpg',
							url: '/pages/goods/goodList'
						},
						img1: {
							src: '/static/images/2.jpg',
							url: ''
						},
						img2: {
							src: '/static/images/3.jpg',
							url: ''
						},
						img3: {
							src: '/static/images/4.jpg',
							url: ''
						},
						img4: {
							src: '/static/images/5.jpg',
							url: ''
						},
						img5: {
							src: '/static/images/6.jpg',
							url: ''
						},
					}
				],
				
			}
		},
		created() {
		},
		mounted() {
			
		},
		methods: {
			search(data) {
				console.log(data.value)
			},
			toDetail() {
				uni.navigateTo({
					url: '../goods/goodList'
				})
			}
		}
	}
</script>

<style>
	.header swiper {
		width: 100%;
		height: 400rpx;
	}
	.header swiper image {
		width: 100%;
		height: 400rpx;
	}
</style>
